<?php

namespace app\company\model;

use app\common\model\BaseModel;
use app\common\model\Driver;
use app\common\model\Salesman;
use app\common\model\Store;
use think\model\relation\BelongsTo;

class AccountPaymentRecord extends BaseModel
{
    public function handler(): BelongsTo
    {
        return $this->belongsTo(CompanyUser::class, 'handler_id');
    }

    public function salesman(): BelongsTo
    {
        return $this->belongsTo(Salesman::class,'payee_id');
    }

    public function driver(): BelongsTo
    {
        return $this->belongsTo(Driver::class, 'payee_id');
    }

    public function store(): BelongsTo
    {
        return $this->belongsTo(Store::class, 'store_id');
    }
}